
------------------------

x6502
Ricoh 2A03 Disassembler

V.1.2.0.0
Sept 06, 2015

MarkGrass
www.romhacking.net

------------------------

x6502 is a simple commandline utility used to disassemble NES ROM data.

Disassembled output can be used in a variety of assemblers.

Commands can be given in no particular order and are not case-sensitive.

------------------------

These commands are necessary for x6502 to work properly.

ORG <Value>	Program Counter
		--- Directive used for assemblers
		--- Value must be hexdecimal with 0x prefix

START <Value>	NES File Offset
		--- Disassembly will begin at this offset
		--- Value must be hexdecimal with 0x prefix

FINISH <Value>	NES File Offset
		--- Disassembly will halt once this offset is reached
		--- Value must be hexdecimal with 0x prefix

ROM <String>	NES File Name
		--- Name of NES ROM file on your PC
		--- Put this string in quotation marks
		--- If input is in the same folder directory as x6502, prefix with .\

OUT <String>	Assembly File Name
		--- Name of output text file on your PC
		--- Put this string in quotation marks
		--- This command shouldn't be combined with the APPEND command
		--- If output is in the same folder directory as x6502, prefix with .\

APPEND <String>	Assembly File Name
		--- Append disassembly text to end of an existing file
		--- Useful for combining text and data disassembly into single file
		--- Put this string in quotation marks
		--- This command shouldn't be combined with the OUT command
		--- If output is in the same folder directory as x6502, prefix with .\

------------------------

These commands are not necessary.

LABEL		Labels will be implemented for every JMP, branch type and sub-routine

COMMENT		Two semi-colons will be placed on each line for future commenting

DATA		Output data will be #byte data

ADDRESS		Commented file address and counter will be added to each line

------------------------

EXAMPLES:

x6502 org 0xC7B5 start 0x03C7C5 finish 0x03C85E rom "C:\My Folder\Mega Man 2.nes" out "C:\My Folder\Init.s"

x6502 start 0x03C7C5 finish 0x03C85E org 0xC7B5 rom ".\Mega Man 2.nes" out ".\Init.s"

x6502 org 0xC7B5 start 0x03C7C5 finish 0x03C85E rom ".\SubDirectory\Mega Man 2.nes" out "C:\Init.s"

x6502 label comment org 0xC7B5 start 0x03C7C5 finish 0x03C85E rom ".\Mega Man 2.nes" out ".\Init.s"

x6502 org 0xC7B5 start 0x03C7C5 finish 0x03C85E rom ".\Mega Man 2.nes" out ".\Init.s" label comment

APPEND EXAMPLE:
x6502 org 0xC000 start 0x03C010 finish 0x03C6E8 rom ".\Mega Man 3.nes" out ".\source.s" label comment address
x6502 org 0xC6D8 start 0x03C6E8 finish 0x03C75C rom ".\Mega Man 3.nes" append ".\source.s" data
